<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
    <title>仓库信息</title>
    <th:block th:include="statics/common/page/header"></th:block>
</head>
<body>
<div id="rrapp" v-cloak>
	<div v-show="showList">
        <Row class="search-panel-space">
            <div class="search-group">
                <i-col span="5">
                	<label class="search-label-20">仓库编码:</label>
                    <i-input v-model="q.code" @on-enter="query" placeholder="仓库编码" class="search-item-width-75"/>
                </i-col>
                <i-col span="5">
                    <label class="search-label-20">仓库名称:</label>
                    <i-input v-model="q.name" @on-enter="query" placeholder="仓库名称" class="search-item-width-75"/>
                </i-col>
                <i-col span="5">
                    <label class="search-label-20">仓库分类:</label>
                    <i-input v-model="q.classifyName" @on-enter="query" placeholder="仓库分类" class="search-item-width-75"/>
                </i-col>
                <i-col span="5">
                    <label class="search-label-20">仓库地址:</label>
                    <i-input v-model="q.address" @on-enter="query" placeholder="仓库地址" class="search-item-width-75"/>
                </i-col>
                <i-button @click="query">查询</i-button>
                <i-button @click="reloadSearch">重置</i-button>
            </div>
        </Row>    
        <Row :gutter="16">
            <div class="buttons-group">
                <i-button type="info" @click="add" th:if="${@shiroAuthService.hasPermission('storageinfo:save')}">
                	<i class="fa fa-plus"></i>&nbsp;新增</i-button>
                <i-button type="warning" @click="update" th:if="${@shiroAuthService.hasPermission('storageinfo:update')}">
                	<i class="fa fa-pencil-square-o"></i>&nbsp;修改</i-button>
                <i-button type="error" @click="del" th:if="${@shiroAuthService.hasPermission('storageinfo:delete')}">
                	<i class="fa fa-trash-o"></i>&nbsp;删除</i-button>
            </div>
        </Row>
	    <table id="jqGrid"></table>
    </div>

    <Card v-show="!showList">
        <p slot="title">{{title}}</p>
		<i-form ref="formValidate" :model="storageInfo" :rules="ruleValidate" :label-width="80">
            <Form-item label="仓库编码" prop="code">
                <i-input v-model="storageInfo.code" placeholder="仓库编码"/>
            </Form-item>
            <Form-item label="仓库名称" prop="name">
                <i-input v-model="storageInfo.name" placeholder="仓库名称"/>
            </Form-item>
            <Form-item label="仓库分类" prop="classifyId">
                <i-input type="text" v-model="storageInfo.classifyName" icon="eye" readonly="readonly"
                         @on-click="storageClassifyTree" placeholder="所属分类"/>
            </Form-item>
            <Form-item label="地址" prop="address">
                <i-input v-model="storageInfo.address" placeholder="地址"/>
            </Form-item>
            <Form-item label="仓位总数" prop="space">
                <i-input v-model="storageInfo.space" placeholder="仓位总数"/>
            </Form-item>
            <Form-item>
                <i-button type="primary" @click="handleSubmit('formValidate')">提交</i-button>
                <i-button type="warning" @click="reload" style="margin-left: 8px"/>返回</i-button>
                <i-button type="ghost" @click="handleReset('formValidate')" style="margin-left: 8px">重置</i-button>
            </Form-item>
        </i-form>
	</Card>
</div>
<div id="storageClassifyLayer" style="display: none;padding:10px;">
    <ul id="storageClassifyTree" class="ztree"></ul>
</div>
<script th:src="@{../statics/js/product/storageinfo.js}"></script>
</body>
</html>